<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<ui:composition
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:p="http://primefaces.prime.com.tr/ui"
        xmlns:finantial="http://java.sun.com/jsf/composite/components/finantial"
        xmlns:c="http://java.sun.com/jsp/jstl/core">
  

   
         <p:fieldset legend="Tem certeza que deseja deletar esta despesa?" style="text-align: center;padding: 10px">
             <div align="center" style="font-size: 13px;margin-bottom: 6px">
             <h:panelGrid columns="2">
                 <finantial:label for="remove_outcome_des" value="Descrição:"/>
                 <h:inputText disabled="true" id="remove_outcome_des" value="#{financeBean.selectedOutcome.description}"/>
                  <finantial:label for="remove_outcome_date" value="Data:"/>
                  <h:inputText disabled="true" id="remove_outcome_date" value="#{financeBean.selectedOutcome.date}">
                      <f:convertDateTime pattern="dd/MM/yyyy"/>
                  </h:inputText>
                   <finantial:label for="remove_outcome_val" value="Valor:"/>
                   <h:inputText disabled="true" id="remove_outcome_val" value="#{financeBean.selectedOutcome.value}">
                       <f:convertNumber pattern="#,###,##0.00" currencyCode="BRL" type="currency"/>
                       <f:ajax event="blur" render="@this"/>
                   </h:inputText>
                   <finantial:label for="remove_outcome_type" value="Subtipo:"/>
                   <h:inputText disabled="true" id="remove_outcome_type" value="#{financeBean.selectedOutcome.type}"/>
             </h:panelGrid>

            </div>
             <div style="display: inline;">
                     <p:commandButton value="remover" actionListener="#{financeBean.removeOutcome}" style="margin-left:-10px" async="true" ajax="true" update="months_form:months_panel,remove_msg_outcome,messages" oncomplete="handleRemove(args)" />
                     <p:commandButton value="cancelar" onclick="removeModal.hide()" action="#{financeBean.cancelRemove}"  style="margin-left: 10px" />
             </div>
             </p:fieldset>
    <div align="center">
         <p:messages id="remove_msg_outcome" />
</div>   


 

<script type="text/javascript">
    function handleRemove(args){
            setTimeout("wait()",1000);

    }

    function wait(){
        removeModal.hide();
    }

</script>
</ui:composition>